package com.example.userblog.dao;

import com.example.userblog.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
@Repository
public interface UserDao extends Mapper<User> {
    @Select("select * from user where `username`= #{username}")
    User findByUsername(@Param("username") String username);
    @Select("select * from user where `id`= #{id}")
    User findById(@Param("id") Integer id);

}
